package com.czh.dubbo.consumer.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.czh.dubbo.common.entity.People;
import com.czh.dubbo.common.service.PeopleService;

@RestController
@RequestMapping("/test")
public class PeopleController {
	
	@Reference
	private PeopleService peopleService;
	@RequestMapping("/people")
	public People getPeople() {
		System.out.println("-------访问到了-------");
		People people = new People();
		people.setName("zs");
		return peopleService.getPeople(people);
	}
}
